<?php
session_start();
if(!isset($_SESSION['uid']))
 	{?>
		<script type="text/javascript">
			window.location="error.php";
		</script>
	<?php
 	}else
 		{
 			include_once 'dataBaseConnectivityFile.php';
 			$additionalDetails=$_REQUEST['additionalDetails'];
 			$get_id=$_REQUEST["stock_id"];
 			
 			$sql_query="INSERT INTO additional_features (STOCK_ID,	ADDITIONAL_FEATURE_DESCRIPTION, CREATE_DATE, MODIFIED_DATE)
 			 VALUES (".$get_id.",	'".$additionalDetails."',	NOW(), NOW())";
			if(!mysql_query($sql_query,$con))
                {
                   die ("ERROR ".mysql_error());
                }else
                {?>
                        <script type="text/javascript">
                            alert("Additional Details added");
                            window.location="viewDetails.php?stock_id="+<?php echo $get_id?>;
                        </script>							                	
               <?php  
                }	
 		} 
?>